const Login = resolve => require(['./components/Login.vue'], resolve);
const NotFound = resolve => require(['./components/404.vue'], resolve);
const Home = resolve => require(['./components/Home.vue'], resolve);
const Main = resolve => require(['./components/Main.vue'], resolve);
const index = resolve => require(['./components/pages/index.vue'], resolve);
const introduce = resolve => require(['./components/pages/introduce.vue'], resolve);
const newsCenter = resolve => require(['./components/pages/newsCenter.vue'], resolve);
const policies = resolve => require(['./components/pages/policies.vue'], resolve);
const charity = resolve => require(['./components/pages/charity.vue'], resolve);
const acquaintingPagoda = resolve => require(['./components/pages/acquaintingPagoda.vue'], resolve);
const pageList = resolve => require(['./components/pages/pageList.vue'], resolve);
const details = resolve => require(['./components/pages/details.vue'], resolve);

let routes = [{
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/main',
        component: Main,
        hidden: true
    },
    {
        path: '/', redirect: 'index'
    },
    {
        path: '/Home',
        component: Home,
        name: 'home',
            children: [{
            path: '/index',
            component: index,
            name: 'index',
            hidden: true
        },
        {
            path: '/introduce',
            component: introduce,
            name: 'introduce',
            hidden: true
        },
        {
            path: '/newsCenter',
            component: newsCenter,
            name: 'newsCenter',
            hidden: true
        },
        {
            path: '/policies',
            component: policies,
            name: 'policies',
            hidden: true
        },
        {
            path: '/charity',
            component: charity,
            name: 'charity',
            hidden: true
        },
        {
            path: '/acquaintingPagoda',
            component: acquaintingPagoda,
            name: 'acquaintingPagoda',
            hidden: true
        },
        {
            path: '/pageList/:id',
            component: pageList,
            name: 'pageList',
            hidden: true
        },
        {
            path: '/details/:id',
            component: details,
            name: 'details',
            hidden: true
        }]
    },
    {
        path: '*',
        hidden: true,
        redirect: {
            path: '/404'
        }
    }
];

export default routes;